Skip to main content

opaque

Type

property

Summary

Specifies whether the inside of a control or card is opaque or transparent to the objects beneath it.

Syntax

set the opaque of <object> to {true | false}

Description

Use the opaque property to change the appearance of an object.

If a control's opaque property is set to true, its entire rectangle is opaque, and objects underneath it cannot be seen.

If the opaque property is set to false, the text or other content and the borders of the object are drawn, but its background becomes transparent and objects beneath it show through.

The setting of a card's opaque property determines whether it is filled with its effective background color before the objects on it are rendered. If it is false, the stack will first be filled with the effective background color of the stack.

If the object is an image, the setting of the opaque property has no effect. Painted areas of the image are opaque, and areas with no paint (transparent or "erased" areas) are not opaque, regardless of the setting of the image's opaque property.

tip

Graphics whose ink property is set to noOp are transparent, but (unlike Graphics whose opaque is set to false) they still intercept mouse clicks within the graphic's outline. To create an invisible hot spot with a non-rectangular shape, use a curve or polygon graphic and set its ink to noOp.

Setting a button's or field's style property to "opaque" sets its opaque to true.

Cross-platform note

The setting of a button's opaque property has no effect on Mac OS and OS X systems if the lookAndFeel is set to "Appearance Manager", the button's style is "standard", and the button's threeD and showBorder properties are both set to true. In this case, the button is drawn by the operating system's Appearance Manager routines and is always opaque, regardless of the setting of its opaque property.

Examples

set the opaque of control 7 to false

keyword: polygon, opaque, curve, control, graphic, image

object: button, image, graphic

property: strokeGradient, ink, showBorder, properties, threeD, blendLevel, backgroundPattern, style, lookAndFeel, visible, fillRule, fillGradient

glossary: object, property, background, appearance, object, Mac OS, OS X

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?